package cn.xxm.dongbao.user.secure.access;

import cn.xxm.dongbao.user.secure.dos.DosStatisticsException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class DosAccessDeniedHandlerImpl implements DosAccessDeniedHandler {
    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response, DosStatisticsException dosStatisticsException) throws IOException, ServletException {
        response.setStatus(HttpServletResponse.SC_FORBIDDEN);
        response.getWriter().write(dosStatisticsException.getMessage());
    }
}